Skip to content

Ship a patched copy of jquery.validate.unobtrusive.js in @abp/jquery-validation-unobtrusive - #26006

Merged
maliming merged 2 commits into
devfrom
maliming/vendor-jquery-validation-unobtrusive
Aug 21, 2026
Merged

Ship a patched copy of jquery.validate.unobtrusive.js in @abp/jquery-validation-unobtrusive#26006
maliming merged 2 commits into
devfrom
maliming/vendor-jquery-validation-unobtrusive

Conversation

@maliming

Copy link
Copy Markdown
Member

Resolve #25972

The upstream npm package (4.0.0, 2022) still calls $.parseJSON / $.isFunction, which are removed in jQuery 4, and no new release is planned. @abp/jquery-validation-unobtrusive now ships its own copy of the upstream source (JSON.parse, typeof, Function.prototype.bind) and drops the upstream dependency; the served path /libs/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js and the contributor stay the same.

@maliming maliming added this to the 10.8-preview milestone Aug 18, 2026
@maliming
maliming requested a review from EngincanV August 21, 2026 01:52
@maliming
maliming marked this pull request as ready for review August 21, 2026 07:38
Copilot AI lite review requested due to automatic review settings August 21, 2026 07:38
@maliming
maliming merged commit 296ff53 into dev Aug 21, 2026
1 check passed
@maliming
maliming deleted the maliming/vendor-jquery-validation-unobtrusive branch August 21, 2026 07:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses upstream stagnation of jquery-validation-unobtrusive by vendoring a patched copy into @abp/jquery-validation-unobtrusive, updating the served asset mapping while keeping the same served /libs/... path and contributor attribution.

Changes:

  • Add a vendored jquery.validate.unobtrusive.js patched to avoid jQuery APIs removed/deprecated in jQuery 4 ($.parseJSON, $.isFunction, $.proxy).
  • Remove the jquery-validation-unobtrusive npm dependency from @abp/jquery-validation-unobtrusive.
  • Update ABP resource mapping to serve the vendored script from the package itself.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
npm/packs/jquery-validation-unobtrusive/src/jquery.validate.unobtrusive.js Adds the vendored + patched unobtrusive validation script.
npm/packs/jquery-validation-unobtrusive/package.json Drops the upstream jquery-validation-unobtrusive dependency.
npm/packs/jquery-validation-unobtrusive/abp.resourcemapping.js Updates mapping to serve the vendored script path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

/// of adapterName will be used instead.</param>
/// <returns type="jQuery.validator.unobtrusive.adapters" />
return this.add(adapterName, [attribute || "val"], function (options) {
setValidationValues(options, ruleName || adapterName, options.params[attribute]);
Comment on lines 12 to 14
"dependencies": {
"@abp/jquery-validation": "~10.7.0-rc.3",
"jquery-validation-unobtrusive": "^4.0.0"
"@abp/jquery-validation": "~10.7.0-rc.3"
},
* @license
* Unobtrusive validation support library for jQuery and jQuery Validate
* Copyright (c) .NET Foundation. All rights reserved.
* Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decide how to handle jquery-validation-unobtrusive

3 participants